<?php

/**
 * Articulo form base class.
 *
 * @method Articulo getObject() Returns the current form's model object
 *
 * @package    exproaqua
 * @subpackage form
 * @author     Luis Hernández
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseArticuloForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_empresa'         => new sfWidgetFormInputText(),
      'agencia'            => new sfWidgetFormInputText(),
      'codigo'             => new sfWidgetFormInputHidden(),
      'grupo'              => new sfWidgetFormInputText(),
      'subgrupo'           => new sfWidgetFormInputText(),
      'nombre'             => new sfWidgetFormInputText(),
      'nombrecorto'        => new sfWidgetFormInputText(),
      'referencia'         => new sfWidgetFormInputText(),
      'marca'              => new sfWidgetFormInputText(),
      'unidad'             => new sfWidgetFormInputText(),
      'usaexist'           => new sfWidgetFormInputText(),
      'costo'              => new sfWidgetFormInputText(),
      'precio1'            => new sfWidgetFormInputText(),
      'precio2'            => new sfWidgetFormInputText(),
      'precio3'            => new sfWidgetFormInputText(),
      'precio4'            => new sfWidgetFormInputText(),
      'precio5'            => new sfWidgetFormInputText(),
      'precio6'            => new sfWidgetFormInputText(),
      'precio7'            => new sfWidgetFormInputText(),
      'precio8'            => new sfWidgetFormInputText(),
      'preciofin1'         => new sfWidgetFormInputText(),
      'preciofin2'         => new sfWidgetFormInputText(),
      'preciofin3'         => new sfWidgetFormInputText(),
      'preciofin4'         => new sfWidgetFormInputText(),
      'preciofin5'         => new sfWidgetFormInputText(),
      'preciofin6'         => new sfWidgetFormInputText(),
      'preciofin7'         => new sfWidgetFormInputText(),
      'preciofin8'         => new sfWidgetFormInputText(),
      'existencia'         => new sfWidgetFormInputText(),
      'inactiva'           => new sfWidgetFormInputText(),
      'comprometido'       => new sfWidgetFormInputText(),
      'minimo'             => new sfWidgetFormInputText(),
      'maximo'             => new sfWidgetFormInputText(),
      'origen'             => new sfWidgetFormInputText(),
      'impuesto'           => new sfWidgetFormInputText(),
      'usaserial'          => new sfWidgetFormInputText(),
      'comision1'          => new sfWidgetFormInputText(),
      'comision2'          => new sfWidgetFormInputText(),
      'comision3'          => new sfWidgetFormInputText(),
      'comision4'          => new sfWidgetFormInputText(),
      'comision5'          => new sfWidgetFormInputText(),
      'comision6'          => new sfWidgetFormInputText(),
      'comision7'          => new sfWidgetFormInputText(),
      'comision8'          => new sfWidgetFormInputText(),
      'util1'              => new sfWidgetFormInputText(),
      'util2'              => new sfWidgetFormInputText(),
      'util3'              => new sfWidgetFormInputText(),
      'util4'              => new sfWidgetFormInputText(),
      'util5'              => new sfWidgetFormInputText(),
      'util6'              => new sfWidgetFormInputText(),
      'util7'              => new sfWidgetFormInputText(),
      'util8'              => new sfWidgetFormInputText(),
      'formato'            => new sfWidgetFormInputText(),
      'decimales'          => new sfWidgetFormInputText(),
      'compuesto'          => new sfWidgetFormInputText(),
      'cfob'               => new sfWidgetFormInputText(),
      'cnacionali'         => new sfWidgetFormInputText(),
      'prcnac'             => new sfWidgetFormInputText(),
      'cflete'             => new sfWidgetFormInputText(),
      'prcflete'           => new sfWidgetFormInputText(),
      'carancel'           => new sfWidgetFormInputText(),
      'prcarancel'         => new sfWidgetFormInputText(),
      'cgastoper'          => new sfWidgetFormInputText(),
      'prccosoper'         => new sfWidgetFormInputText(),
      'cotroscos'          => new sfWidgetFormInputText(),
      'ccostocyf'          => new sfWidgetFormInputText(),
      'costoex'            => new sfWidgetFormInputText(),
      'costoref'           => new sfWidgetFormInputText(),
      'precio1ex'          => new sfWidgetFormInputText(),
      'precio2ex'          => new sfWidgetFormInputText(),
      'precio3ex'          => new sfWidgetFormInputText(),
      'precio4ex'          => new sfWidgetFormInputText(),
      'precio5ex'          => new sfWidgetFormInputText(),
      'precio6ex'          => new sfWidgetFormInputText(),
      'precio7ex'          => new sfWidgetFormInputText(),
      'precio8ex'          => new sfWidgetFormInputText(),
      'factor'             => new sfWidgetFormInputText(),
      'garantia'           => new sfWidgetFormInputText(),
      'empaque'            => new sfWidgetFormInputText(),
      'unidadgrp'          => new sfWidgetFormInputText(),
      'cntgrp'             => new sfWidgetFormInputText(),
      'costgrp'            => new sfWidgetFormInputText(),
      'precio1grp'         => new sfWidgetFormInputText(),
      'precio2grp'         => new sfWidgetFormInputText(),
      'precio3grp'         => new sfWidgetFormInputText(),
      'precio4grp'         => new sfWidgetFormInputText(),
      'precio5grp'         => new sfWidgetFormInputText(),
      'precio6grp'         => new sfWidgetFormInputText(),
      'precio7grp'         => new sfWidgetFormInputText(),
      'precio8grp'         => new sfWidgetFormInputText(),
      'prcgrp1'            => new sfWidgetFormInputText(),
      'prcgrp2'            => new sfWidgetFormInputText(),
      'prcgrp3'            => new sfWidgetFormInputText(),
      'prcgrp4'            => new sfWidgetFormInputText(),
      'prcgrp5'            => new sfWidgetFormInputText(),
      'prcgrp6'            => new sfWidgetFormInputText(),
      'prcgrp7'            => new sfWidgetFormInputText(),
      'prcgrp8'            => new sfWidgetFormInputText(),
      'creadopor'          => new sfWidgetFormInputText(),
      'modifpor'           => new sfWidgetFormInputText(),
      'margenpor'          => new sfWidgetFormInputText(),
      'costo_ant'          => new sfWidgetFormInputText(),
      'costo_prom'         => new sfWidgetFormInputText(),
      'impuesto1'          => new sfWidgetFormInputText(),
      'impuesto2'          => new sfWidgetFormInputText(),
      'impuesto3'          => new sfWidgetFormInputText(),
      'impuesto4'          => new sfWidgetFormInputText(),
      'impuesto5'          => new sfWidgetFormInputText(),
      'impuesto6'          => new sfWidgetFormInputText(),
      'rutafoto'           => new sfWidgetFormInputText(),
      'detalles'           => new sfWidgetFormTextarea(),
      'contraindi'         => new sfWidgetFormTextarea(),
      'usointerno'         => new sfWidgetFormInputText(),
      'aux1'               => new sfWidgetFormInputText(),
      'aux2'               => new sfWidgetFormInputText(),
      'aux3'               => new sfWidgetFormInputText(),
      'simbolo'            => new sfWidgetFormInputText(),
      'modelo'             => new sfWidgetFormInputText(),
      'discont'            => new sfWidgetFormInputText(),
      'flotante'           => new sfWidgetFormInputText(),
      'cimpuesto1'         => new sfWidgetFormInputText(),
      'cimpuesto2'         => new sfWidgetFormInputText(),
      'cimpuesto3'         => new sfWidgetFormInputText(),
      'cimpuesto4'         => new sfWidgetFormInputText(),
      'cimpuesto5'         => new sfWidgetFormInputText(),
      'cimpuesto6'         => new sfWidgetFormInputText(),
      'fechacrea'          => new sfWidgetFormDate(),
      'cuentacont'         => new sfWidgetFormInputText(),
      'metodo'             => new sfWidgetFormInputText(),
      'sevence'            => new sfWidgetFormInputText(),
      'usalotes'           => new sfWidgetFormInputText(),
      'controlado'         => new sfWidgetFormInputText(),
      'volumen'            => new sfWidgetFormInputText(),
      'peso'               => new sfWidgetFormInputText(),
      'diametro'           => new sfWidgetFormInputText(),
      'usabalanza'         => new sfWidgetFormInputText(),
      'topeminvent'        => new sfWidgetFormInputText(),
      'topemaxvent'        => new sfWidgetFormInputText(),
      'forma'              => new sfWidgetFormInputText(),
      'esvehiculo'         => new sfWidgetFormInputText(),
      'aceptadscto'        => new sfWidgetFormInputText(),
      'aceptacred'         => new sfWidgetFormInputText(),
      'metodoround'        => new sfWidgetFormInputText(),
      'unidinamica'        => new sfWidgetFormInputText(),
      'campo1'             => new sfWidgetFormInputText(),
      'campo2'             => new sfWidgetFormInputText(),
      'campo3'             => new sfWidgetFormInputText(),
      'campo4'             => new sfWidgetFormInputText(),
      'campo5'             => new sfWidgetFormInputText(),
      'campo6'             => new sfWidgetFormInputText(),
      'campo7'             => new sfWidgetFormInputText(),
      'campo8'             => new sfWidgetFormInputText(),
      'campo9'             => new sfWidgetFormInputText(),
      'campo10'            => new sfWidgetFormInputText(),
      'imp_nacional'       => new sfWidgetFormInputText(),
      'imp_producc'        => new sfWidgetFormInputText(),
      'gimp_nacional'      => new sfWidgetFormInputText(),
      'gimp_producc'       => new sfWidgetFormInputText(),
      'ctacontinv'         => new sfWidgetFormInputText(),
      'ctacontcostos'      => new sfWidgetFormInputText(),
      'ctacontingresos'    => new sfWidgetFormInputText(),
      'blocked'            => new sfWidgetFormInputText(),
      'usatallacolor'      => new sfWidgetFormInputText(),
      'deposito_in'        => new sfWidgetFormInputText(),
      'deposito_out'       => new sfWidgetFormInputText(),
      'und_simpleagrupado' => new sfWidgetFormInputText(),
      'usa_servidor'       => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id_empresa'         => new sfValidatorString(array('max_length' => 6)),
      'agencia'            => new sfValidatorString(array('max_length' => 3)),
      'codigo'             => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'codigo', 'required' => false)),
      'grupo'              => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'subgrupo'           => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'nombre'             => new sfValidatorString(array('max_length' => 80, 'required' => false)),
      'nombrecorto'        => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'referencia'         => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'marca'              => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'unidad'             => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'usaexist'           => new sfValidatorNumber(array('required' => false)),
      'costo'              => new sfValidatorNumber(array('required' => false)),
      'precio1'            => new sfValidatorNumber(array('required' => false)),
      'precio2'            => new sfValidatorNumber(array('required' => false)),
      'precio3'            => new sfValidatorNumber(array('required' => false)),
      'precio4'            => new sfValidatorNumber(array('required' => false)),
      'precio5'            => new sfValidatorNumber(array('required' => false)),
      'precio6'            => new sfValidatorNumber(array('required' => false)),
      'precio7'            => new sfValidatorNumber(array('required' => false)),
      'precio8'            => new sfValidatorNumber(array('required' => false)),
      'preciofin1'         => new sfValidatorNumber(array('required' => false)),
      'preciofin2'         => new sfValidatorNumber(array('required' => false)),
      'preciofin3'         => new sfValidatorNumber(array('required' => false)),
      'preciofin4'         => new sfValidatorNumber(array('required' => false)),
      'preciofin5'         => new sfValidatorNumber(array('required' => false)),
      'preciofin6'         => new sfValidatorNumber(array('required' => false)),
      'preciofin7'         => new sfValidatorNumber(array('required' => false)),
      'preciofin8'         => new sfValidatorNumber(array('required' => false)),
      'existencia'         => new sfValidatorNumber(array('required' => false)),
      'inactiva'           => new sfValidatorNumber(array('required' => false)),
      'comprometido'       => new sfValidatorNumber(array('required' => false)),
      'minimo'             => new sfValidatorNumber(array('required' => false)),
      'maximo'             => new sfValidatorNumber(array('required' => false)),
      'origen'             => new sfValidatorNumber(array('required' => false)),
      'impuesto'           => new sfValidatorNumber(array('required' => false)),
      'usaserial'          => new sfValidatorNumber(array('required' => false)),
      'comision1'          => new sfValidatorNumber(array('required' => false)),
      'comision2'          => new sfValidatorNumber(array('required' => false)),
      'comision3'          => new sfValidatorNumber(array('required' => false)),
      'comision4'          => new sfValidatorNumber(array('required' => false)),
      'comision5'          => new sfValidatorNumber(array('required' => false)),
      'comision6'          => new sfValidatorNumber(array('required' => false)),
      'comision7'          => new sfValidatorNumber(array('required' => false)),
      'comision8'          => new sfValidatorNumber(array('required' => false)),
      'util1'              => new sfValidatorNumber(array('required' => false)),
      'util2'              => new sfValidatorNumber(array('required' => false)),
      'util3'              => new sfValidatorNumber(array('required' => false)),
      'util4'              => new sfValidatorNumber(array('required' => false)),
      'util5'              => new sfValidatorNumber(array('required' => false)),
      'util6'              => new sfValidatorNumber(array('required' => false)),
      'util7'              => new sfValidatorNumber(array('required' => false)),
      'util8'              => new sfValidatorNumber(array('required' => false)),
      'formato'            => new sfValidatorString(array('max_length' => 10, 'required' => false)),
      'decimales'          => new sfValidatorNumber(array('required' => false)),
      'compuesto'          => new sfValidatorNumber(array('required' => false)),
      'cfob'               => new sfValidatorNumber(array('required' => false)),
      'cnacionali'         => new sfValidatorNumber(array('required' => false)),
      'prcnac'             => new sfValidatorNumber(array('required' => false)),
      'cflete'             => new sfValidatorNumber(array('required' => false)),
      'prcflete'           => new sfValidatorNumber(array('required' => false)),
      'carancel'           => new sfValidatorNumber(array('required' => false)),
      'prcarancel'         => new sfValidatorNumber(array('required' => false)),
      'cgastoper'          => new sfValidatorNumber(array('required' => false)),
      'prccosoper'         => new sfValidatorNumber(array('required' => false)),
      'cotroscos'          => new sfValidatorNumber(array('required' => false)),
      'ccostocyf'          => new sfValidatorNumber(array('required' => false)),
      'costoex'            => new sfValidatorNumber(array('required' => false)),
      'costoref'           => new sfValidatorNumber(array('required' => false)),
      'precio1ex'          => new sfValidatorNumber(array('required' => false)),
      'precio2ex'          => new sfValidatorNumber(array('required' => false)),
      'precio3ex'          => new sfValidatorNumber(array('required' => false)),
      'precio4ex'          => new sfValidatorNumber(array('required' => false)),
      'precio5ex'          => new sfValidatorNumber(array('required' => false)),
      'precio6ex'          => new sfValidatorNumber(array('required' => false)),
      'precio7ex'          => new sfValidatorNumber(array('required' => false)),
      'precio8ex'          => new sfValidatorNumber(array('required' => false)),
      'factor'             => new sfValidatorNumber(array('required' => false)),
      'garantia'           => new sfValidatorNumber(array('required' => false)),
      'empaque'            => new sfValidatorNumber(array('required' => false)),
      'unidadgrp'          => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'cntgrp'             => new sfValidatorNumber(array('required' => false)),
      'costgrp'            => new sfValidatorNumber(array('required' => false)),
      'precio1grp'         => new sfValidatorNumber(array('required' => false)),
      'precio2grp'         => new sfValidatorNumber(array('required' => false)),
      'precio3grp'         => new sfValidatorNumber(array('required' => false)),
      'precio4grp'         => new sfValidatorNumber(array('required' => false)),
      'precio5grp'         => new sfValidatorNumber(array('required' => false)),
      'precio6grp'         => new sfValidatorNumber(array('required' => false)),
      'precio7grp'         => new sfValidatorNumber(array('required' => false)),
      'precio8grp'         => new sfValidatorNumber(array('required' => false)),
      'prcgrp1'            => new sfValidatorNumber(array('required' => false)),
      'prcgrp2'            => new sfValidatorNumber(array('required' => false)),
      'prcgrp3'            => new sfValidatorNumber(array('required' => false)),
      'prcgrp4'            => new sfValidatorNumber(array('required' => false)),
      'prcgrp5'            => new sfValidatorNumber(array('required' => false)),
      'prcgrp6'            => new sfValidatorNumber(array('required' => false)),
      'prcgrp7'            => new sfValidatorNumber(array('required' => false)),
      'prcgrp8'            => new sfValidatorNumber(array('required' => false)),
      'creadopor'          => new sfValidatorString(array('max_length' => 8, 'required' => false)),
      'modifpor'           => new sfValidatorString(array('max_length' => 8, 'required' => false)),
      'margenpor'          => new sfValidatorString(array('max_length' => 1, 'required' => false)),
      'costo_ant'          => new sfValidatorNumber(array('required' => false)),
      'costo_prom'         => new sfValidatorNumber(array('required' => false)),
      'impuesto1'          => new sfValidatorNumber(array('required' => false)),
      'impuesto2'          => new sfValidatorNumber(array('required' => false)),
      'impuesto3'          => new sfValidatorNumber(array('required' => false)),
      'impuesto4'          => new sfValidatorNumber(array('required' => false)),
      'impuesto5'          => new sfValidatorNumber(array('required' => false)),
      'impuesto6'          => new sfValidatorNumber(array('required' => false)),
      'rutafoto'           => new sfValidatorString(array('max_length' => 80, 'required' => false)),
      'detalles'           => new sfValidatorString(array('required' => false)),
      'contraindi'         => new sfValidatorString(array('required' => false)),
      'usointerno'         => new sfValidatorNumber(array('required' => false)),
      'aux1'               => new sfValidatorNumber(array('required' => false)),
      'aux2'               => new sfValidatorNumber(array('required' => false)),
      'aux3'               => new sfValidatorNumber(array('required' => false)),
      'simbolo'            => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'modelo'             => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'discont'            => new sfValidatorNumber(array('required' => false)),
      'flotante'           => new sfValidatorNumber(array('required' => false)),
      'cimpuesto1'         => new sfValidatorNumber(array('required' => false)),
      'cimpuesto2'         => new sfValidatorNumber(array('required' => false)),
      'cimpuesto3'         => new sfValidatorNumber(array('required' => false)),
      'cimpuesto4'         => new sfValidatorNumber(array('required' => false)),
      'cimpuesto5'         => new sfValidatorNumber(array('required' => false)),
      'cimpuesto6'         => new sfValidatorNumber(array('required' => false)),
      'fechacrea'          => new sfValidatorDate(array('required' => false)),
      'cuentacont'         => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'metodo'             => new sfValidatorNumber(array('required' => false)),
      'sevence'            => new sfValidatorNumber(array('required' => false)),
      'usalotes'           => new sfValidatorNumber(array('required' => false)),
      'controlado'         => new sfValidatorNumber(array('required' => false)),
      'volumen'            => new sfValidatorNumber(array('required' => false)),
      'peso'               => new sfValidatorNumber(array('required' => false)),
      'diametro'           => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'usabalanza'         => new sfValidatorNumber(array('required' => false)),
      'topeminvent'        => new sfValidatorNumber(array('required' => false)),
      'topemaxvent'        => new sfValidatorNumber(array('required' => false)),
      'forma'              => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'esvehiculo'         => new sfValidatorNumber(array('required' => false)),
      'aceptadscto'        => new sfValidatorNumber(array('required' => false)),
      'aceptacred'         => new sfValidatorNumber(array('required' => false)),
      'metodoround'        => new sfValidatorNumber(array('required' => false)),
      'unidinamica'        => new sfValidatorNumber(array('required' => false)),
      'campo1'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo2'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo3'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo4'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo5'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo6'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo7'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo8'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo9'             => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'campo10'            => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'imp_nacional'       => new sfValidatorNumber(array('required' => false)),
      'imp_producc'        => new sfValidatorNumber(array('required' => false)),
      'gimp_nacional'      => new sfValidatorNumber(array('required' => false)),
      'gimp_producc'       => new sfValidatorNumber(array('required' => false)),
      'ctacontinv'         => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'ctacontcostos'      => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'ctacontingresos'    => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'blocked'            => new sfValidatorNumber(array('required' => false)),
      'usatallacolor'      => new sfValidatorNumber(array('required' => false)),
      'deposito_in'        => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'deposito_out'       => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'und_simpleagrupado' => new sfValidatorNumber(array('required' => false)),
      'usa_servidor'       => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('articulo[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Articulo';
  }

}
